import 'package:flutter/material.dart';
import 'package:flutter/widgets.dart';

import '../components/PageWrap.dart';


class SingleChildScrollViewLn extends StatefulWidget {
  const SingleChildScrollViewLn({super.key});

  @override
  State<SingleChildScrollViewLn> createState() => _SingleChildScrollViewLnState();
}

class _SingleChildScrollViewLnState extends State<SingleChildScrollViewLn> {
  @override
  Widget build(BuildContext context) {
    String str = "ABCDEFGHIJKLMNOPQRSTUVWXYZ";
    return PageWrap(
      title: "SingleChildScrollView",
      children: <Widget>[
        SingleChildScrollView(
          padding: EdgeInsets.all(16.0),
          child: Center(
            child: Column(
              //动态创建一个List<Widget>
              children: str.split("")
              //每一个字母都用一个Text显示,字体为原来的两倍
                  .map((c) => Text(c, textScaleFactor: 2.0,))
                  .toList(),
            ),
          ),
        ),
      ],
    );
  }
}
